Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function ResizePalette Lib "gdi32" (ByVal hPalette As Long, ByVal nNumEntries As Long) As Long
Private Declare Function SetPaletteEntries Lib "gdi32" (ByVal hPalette As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
Private Declare Function RealizePalette Lib "gdi32" (ByVal hdc As Long) As Long
Private Const RASTERCAPS = 38
Private Const RC_PALETTE = &H100
' Resize picCustom's palette so it has only one
' entry. We will use that entry to display the
' color selected by the scroll bars.
Private Sub ShrinkPalette()
If ResizePalette(picCustom.Picture.hPal, 1) = 0 Then